package com.szqhyxj.youxiangju.biz.creditReport;

import com.szqhyxj.youxiangju.biz.card.CardModel;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/4.
 */

public class CreditReportModel {

    private interface CreditReportService{
        @FormUrlEncoded
        @POST("merchant/realauth")
        Observable<BaseResult> report(
                @Field("bankCardPic") String bankCardPic,
                @Field("cardId") String cardId,
                @Field("autographPic") String autographPic
        );

    }


   public static Observable<BaseResult> getReport(CreditReportEntity creditReportEntity){
       return RetrofitFacade.Companion.getRetrofit().create(CreditReportService.class).report(
               creditReportEntity.getBankCardPic(),
               creditReportEntity.getCardId(),
               creditReportEntity.getAutographPic()
       );
   }

}
